-
Notifications
You must be signed in to change notification settings - Fork 78
fix(FR-1597): exclude name field from KeypairResourcePolicySettingModal props #4443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug where the 'name' field was incorrectly included in the API payload when updating keypair resource policies, causing API errors since 'name' is not a modifiable field.
Key Change:
- Modified the
_.omit()function call in thehandleOkmethod to exclude the 'name' field along with 'parsedTotalResourceSlots' from the props object sent to the API
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 4.65% | 532/11432 |
| 🔴 | Branches | 3.76% | 302/8030 |
| 🔴 | Functions | 2.88% | 102/3544 |
| 🔴 | Lines | 4.6% | 514/11172 |
Test suite run success
121 tests passing in 14 suites.
Report generated by 🧪jest coverage report action from 4f4ca4f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merge activity
|
…al props (#4443) Resolves #4442 ([FR-1597](https://lablup.atlassian.net/browse/FR-1597)) ## Summary This PR fixes a bug in the KeypairResourcePolicySettingModal component where the 'name' field was being incorrectly passed in the props object when updating keypair resource policies. ## Changes - Added 'name' to the `_.omit()` function to exclude it from the props object in the `handleOk` method - This prevents the 'name' field from being included in the modification payload sent to the API ## Why this fix is needed The 'name' field should not be included in the modification payload when updating keypair resource policies, as it's not a modifiable field and causes issues with the API. ## Testing - Verify that creating/modifying keypair resource policies works correctly - Ensure the 'name' field is not included in the API payload - Confirm no regression in existing functionality [FR-1597]: https://lablup.atlassian.net/browse/FR-1597?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
6a830b2 to
4f4ca4f
Compare

Resolves #4442 (FR-1597)
Summary
This PR fixes a bug in the KeypairResourcePolicySettingModal component where the 'name' field was being incorrectly passed in the props object when updating keypair resource policies.
Changes
_.omit()function to exclude it from the props object in thehandleOkmethodWhy this fix is needed
The 'name' field should not be included in the modification payload when updating keypair resource policies, as it's not a modifiable field and causes issues with the API.
Testing